
/*
 * @Author: 玄绮 <shijiahansi@qq.com>
 * @Description: led 实验
 * @Date: 2021-10-27 08:56:27
 * @LastEditTime: 2021-10-30 17:05:13
 */
#include <REG52.H>
#include "51_type.h"
#include "commom.h"

#define LED_PORT P2

/**
 * @Author: 玄绮 <shijiahansi@qq.com>
 * @Date: 2021-10-27 09:32:35
 * @brief led 流水 
 * @param void
 * @return void
 */
void led_water()
{
    uint8 max = 0x080; //1000 0000      0000 0000
    uint8 i = 0x01;    //  0000 0001
    for (i = 0x01; i < max; i <<= 1)
    {
        LED_PORT = ~i;
        delay_1ms(100);
    }
    LED_PORT = ~i;
    delay_1ms(100);
    LED_PORT = ~0;
}
